#!/usr/bin/env python
#!/usr/bin/env python
#
# CUBudget: http://code.google.com/p/cubudget
#
# Copyright (c) 2008 Clemson University
# Released under the GNU GPL, version 2.
import coreApiclass Interest_Compund (object):    def __init__(self):        self.balance = 0     	self.principal = 0		self.annual = 0
		self.compound = 0
		self.year = 0		self.after_time = 0        self.totalBalance = 0   #Total averall balance    # gets balance from the core then returns the current balance    def getBalance(self, curAccount):        return coreApi.getBalance()        def interest_runner(self, account):		#should go through each account and compute interest        for eachAccount in account:
        	
        	# if interest == true  #checks if interest needs to be computed            self.balance = self.getBalance(eachAccount)            self.principal += self.balance            if(self.compound != 0):
		        self.after_time =  (1 + ( self.annual / self.compound))
		        self.after_time.exp( self.year * self.time)
		        self.after_time = self.principal * self.after_time
			else:
				self.after_time = principal
            return self.after_time
            
